package com.wmh.baseservice.user.pojo;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;

/**
 * @author wmh generator
 * @since 2022-12-12
 */
@ApiModel(value="UsInfo对象", description="用户-信息表")
public class UsInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "状态0正常 1冻结")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "版本号")
    @Version
    private Integer version;

    @ApiModelProperty(value = "真实姓名")
    private String name;

    @ApiModelProperty(value = "头像")
    private String avatar;

    @ApiModelProperty(value = "微信昵称")
    private String nick;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "openId")
    private String openId;

    @ApiModelProperty(value = "手机号")
    private String phone;

    @ApiModelProperty(value = "积分余额")
    private Double score;

    @ApiModelProperty(value = "账户余额")
    private BigDecimal balance;

    private Date createTime;

    @ApiModelProperty(value = "个人二维码")
    private String qrCode;

    @ApiModelProperty(value = "登录次数")
    private Integer loginCount;

    @ApiModelProperty(value = "上次登录时间")
    private Date loginTime;

    @ApiModelProperty(value = "盐")
    private String salt;

    @ApiModelProperty(value = "邀请码")
    private String inviteCode;

    @ApiModelProperty(value = "商家id")
    private Long merchantId;

    @ApiModelProperty(value = "邀请人id")
    private Long inviteId;

    @ApiModelProperty(value = "服务号openId")
    private String mpOpenId;

    @ApiModelProperty(value = "开放uni_id")
    private String unionId;

    public Long getId() {
        return id;
    }

    public UsInfo setId(Long id) {
        this.id = id;
        return this;
    }
    public Integer getStatus() {
        return status;
    }

    public UsInfo setStatus(Integer status) {
        this.status = status;
        return this;
    }
    public String getRemark() {
        return remark;
    }

    public UsInfo setRemark(String remark) {
        this.remark = remark;
        return this;
    }
    public Integer getVersion() {
        return version;
    }

    public UsInfo setVersion(Integer version) {
        this.version = version;
        return this;
    }
    public String getName() {
        return name;
    }

    public UsInfo setName(String name) {
        this.name = name;
        return this;
    }
    public String getAvatar() {
        return avatar;
    }

    public UsInfo setAvatar(String avatar) {
        this.avatar = avatar;
        return this;
    }
    public String getNick() {
        return nick;
    }

    public UsInfo setNick(String nick) {
        this.nick = nick;
        return this;
    }
    public String getPassword() {
        return password;
    }

    public UsInfo setPassword(String password) {
        this.password = password;
        return this;
    }
    public String getOpenId() {
        return openId;
    }

    public UsInfo setOpenId(String openId) {
        this.openId = openId;
        return this;
    }
    public String getPhone() {
        return phone;
    }

    public UsInfo setPhone(String phone) {
        this.phone = phone;
        return this;
    }
    public Double getScore() {
        return score;
    }

    public UsInfo setScore(Double score) {
        this.score = score;
        return this;
    }
    public BigDecimal getBalance() {
        return balance;
    }

    public UsInfo setBalance(BigDecimal balance) {
        this.balance = balance;
        return this;
    }
    public Date getCreateTime() {
        return createTime;
    }

    public UsInfo setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }
    public String getQrCode() {
        return qrCode;
    }

    public UsInfo setQrCode(String qrCode) {
        this.qrCode = qrCode;
        return this;
    }
    public Integer getLoginCount() {
        return loginCount;
    }

    public UsInfo setLoginCount(Integer loginCount) {
        this.loginCount = loginCount;
        return this;
    }
    public Date getLoginTime() {
        return loginTime;
    }

    public UsInfo setLoginTime(Date loginTime) {
        this.loginTime = loginTime;
        return this;
    }
    public String getSalt() {
        return salt;
    }

    public UsInfo setSalt(String salt) {
        this.salt = salt;
        return this;
    }
    public String getInviteCode() {
        return inviteCode;
    }

    public UsInfo setInviteCode(String inviteCode) {
        this.inviteCode = inviteCode;
        return this;
    }
    public Long getMerchantId() {
        return merchantId;
    }

    public UsInfo setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
        return this;
    }
    public Long getInviteId() {
        return inviteId;
    }

    public UsInfo setInviteId(Long inviteId) {
        this.inviteId = inviteId;
        return this;
    }
    public String getMpOpenId() {
        return mpOpenId;
    }

    public UsInfo setMpOpenId(String mpOpenId) {
        this.mpOpenId = mpOpenId;
        return this;
    }
    public String getUnionId() {
        return unionId;
    }

    public UsInfo setUnionId(String unionId) {
        this.unionId = unionId;
        return this;
    }

    public static final String ID = "id";

    public static final String STATUS = "status";

    public static final String REMARK = "remark";

    public static final String VERSION = "version";

    public static final String NAME = "name";

    public static final String AVATAR = "avatar";

    public static final String NICK = "nick";

    public static final String PASSWORD = "password";

    public static final String OPEN_ID = "open_id";

    public static final String PHONE = "phone";

    public static final String SCORE = "score";

    public static final String BALANCE = "balance";

    public static final String CREATE_TIME = "create_time";

    public static final String QR_CODE = "qr_code";

    public static final String LOGIN_COUNT = "login_count";

    public static final String LOGIN_TIME = "login_time";

    public static final String SALT = "salt";

    public static final String INVITE_CODE = "invite_code";

    public static final String MERCHANT_ID = "merchant_id";

    public static final String INVITE_ID = "invite_id";

    public static final String MP_OPEN_ID = "mp_open_id";

    public static final String UNION_ID = "union_id";

    @Override
    public String toString() {
        return "UsInfo{" +
            "id=" + id +
            ", status=" + status +
            ", remark=" + remark +
            ", version=" + version +
            ", name=" + name +
            ", avatar=" + avatar +
            ", nick=" + nick +
            ", password=" + password +
            ", openId=" + openId +
            ", phone=" + phone +
            ", score=" + score +
            ", balance=" + balance +
            ", createTime=" + createTime +
            ", qrCode=" + qrCode +
            ", loginCount=" + loginCount +
            ", loginTime=" + loginTime +
            ", salt=" + salt +
            ", inviteCode=" + inviteCode +
            ", merchantId=" + merchantId +
            ", inviteId=" + inviteId +
            ", mpOpenId=" + mpOpenId +
            ", unionId=" + unionId +
        "}";
    }

    public final static String[] getFields(String ...noField){
        List<String> list = new ArrayList<>(Arrays.asList(
            UsInfo.ID
            ,UsInfo.STATUS
            ,UsInfo.REMARK
            ,UsInfo.VERSION
            ,UsInfo.NAME
            ,UsInfo.AVATAR
            ,UsInfo.NICK
            ,UsInfo.PASSWORD
            ,UsInfo.OPEN_ID
            ,UsInfo.PHONE
            ,UsInfo.SCORE
            ,UsInfo.BALANCE
            ,UsInfo.CREATE_TIME
            ,UsInfo.QR_CODE
            ,UsInfo.LOGIN_COUNT
            ,UsInfo.LOGIN_TIME
            ,UsInfo.SALT
            ,UsInfo.INVITE_CODE
            ,UsInfo.MERCHANT_ID
            ,UsInfo.INVITE_ID
            ,UsInfo.MP_OPEN_ID
            ,UsInfo.UNION_ID
        ));
        list.removeAll(new ArrayList<>(Arrays.asList(noField)));
        return list.toArray(new String[0]);
    }
}